package main.model.critters.genetics;

public class Gene {
	private final static int GENEMAX = 100;
	
	private GeneType geneType;
	private int effect = GENEMAX/2;
	private int dominance = GENEMAX/2;
	
	public Gene(GeneType geneType){
		this.geneType = geneType;
	}
	
	public String getName(){return geneType.getName();}
	
	public static int getGeneMax(){return GENEMAX;}
	
	public void setEffect(int effect){
		if(effect > GENEMAX){
			this.effect = GENEMAX;
		}else if(effect < 0){
			this.effect = 0;
		}else{
			this.effect = effect;
		}
	}
	public int getEffect(){return effect;}
	
	public void setDominance(int dominance){
		if(dominance > GENEMAX){
			this.dominance = GENEMAX;
		}else if(dominance < 0){
			this.dominance = 0;
		}else{
			this.dominance = dominance;
		}
	}
	
	public int getDominance(){return dominance;}
}
